package com.red.star.wechat.data.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * @ProjectName: macalline-data-server$
 * @Package: com.red.star.macalline.data.entity$
 * @Description: 二维码实体
 * @Author: xuquanyu
 * @CreateDate: 2018/8/16$ 上午16:19$
 * @Version: 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "ImagePoster", description = "编辑器二维码实体")
@Table(name = "t_image_poster")
public class ImagePoster extends BaseEntity {
    /**
     * 海报名称
     */
    @ApiModelProperty(value = "海报名称")
    private String posterName;

    /**
     * 海报id
     */
    @ApiModelProperty(value = "海报id", example = "0")
    private Integer posterId;

    /**
     * 商场名称
     */
    @ApiModelProperty(value = "商场名称")
    private String mallName;

    /**
     * 商场code
     */
    @ApiModelProperty(value = "商场code")
    private String mallCode;

    /**
     * 二维码类型  0 小程序 ,1 h5  2:app  3:公众号    4：外部h5  5：竖版h5   6：疯狂h5
     */
    @ApiModelProperty(value = "二维码类型  0 小程序 ,1 h5  2:app  3:公众号    4：外部h5  5：竖版h5   6：疯狂h5",  example = "0")
    private Integer type;

    /**
     * 状态 : 0 正常， 1 已删除
     */
    @ApiModelProperty(value = "状态 : 0 正常， 1 已删除", example = "0")
    private Integer status;

    /**
     * 二维码路径url
     */
    @ApiModelProperty(value = "url", example = " ")
    private String url;


    /**
     * 扫码人数
     */
    @Transient
    @ApiModelProperty(value = "扫码人数", example = "0")
    private Integer scanPeoples;

    /**
     * 扫码次数
     */
    @Transient
    @ApiModelProperty(value = "扫码次数", example = "0")
    private Integer scanNum;

    /**
     * app下载地址
     */
    @ApiModelProperty(value = "app下载地址")
    private String appUrl;

    public ImagePoster(String mallName, String mallCode, Integer type, Integer status) {
        this.mallName = mallName;
        this.mallCode = mallCode;
        this.type = type;
        this.status = status;
    }
}
